package com.itany.conf;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 测试mvc配置
 *
 * @author Tom
 * @date 2021/06/26
 */
@Configuration
public class TestMvcConfig implements WebMvcConfigurer {


    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/showlist").setViewName("userlist");
        registry.addViewController("/showIndex").setViewName("index");
        registry.addViewController("/showUserList").setViewName("userlist");
    }




}
